package org.jeecg.modules.demo.crm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.crm.entity.CWeixin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 微信记录表
 * @Author: jeecg-boot
 * @Date:   2025-07-15
 * @Version: V1.0
 */
public interface CWeixinMapper extends BaseMapper<CWeixin> {

    @Select("select * from c_weixin where open_id=#{openid} limit 1")
    CWeixin findByOpenId(@Param("openid") String openid);

    @Delete("delete from c_weixin where open_id=#{openid} ")
    void deleteByOpenId(@Param("openid") String openid);

    @Select("select * from c_weixin where user_id=#{userId} limit 1")
    CWeixin findbyUserId(@Param("userId")String userId);

    @Delete("delete from c_weixin where user_id=#{userId} ")
    void deleteByUserId(@Param("userId") String userId);
}
